import Vue from 'vue'
import appRouter from 'vue-app-router'

import Success from './views/common/Success'

import Home from './views/Home'

import ShopDetail from './views/shop/Detail'
import ShopActivityList from './views/shop/ActivityList'
import FairyList from './views/shop/FairyList'

import ActivityDetail from './views/activity/Detail'
import ActivityDetailLarge from './views/activity/DetailLarge'
import PreOrder from './views/activity/PreOrder'

import MyActivityList from './views/my/ActivityList'
import MyHomeList from './views/my/HomeList'

import ProductShop from './views/product/Shop'

const routes = [
  { path: '', component: Home, title: '茶约' },

  { path: '/success/:title/:message', component: Success, title: '成功' },

  { path: '/shop/detail', component: ShopDetail, title: '体验店详情' },
  { path: '/shop/activity-list', component: ShopActivityList, title: '门店活动' },
  { path: '/shop/fairy-list', component: FairyList, title: '门店仙子' },

  { path: '/activity/detail', component: ActivityDetail, title: '活动详情' },
  { path: '/activity/detail-large', component: ActivityDetailLarge, title: '活动详情' },
  { path: '/activity/pre-order', component: PreOrder, title: '提交订单' },

  { path: '/product/shop', component: ProductShop, title: '消费点单' },

  { path: '/my/activity-list', component: MyActivityList, title: '我参与的活动' },
  { path: '/my/home-list', component: MyHomeList, title: '我预订的房间' },

  { path: '*', component: { template: '<router-view>Page not found</router-view>' } }
]
Vue.use(appRouter, { routes, transition: 'slide' })

export default Vue.prototype.$router
